@echo off

if (%1)=="" goto end_now
if (%2)=="" goto end_now

timeout /T 2 /NOBREAK

if exist %1 goto del_elo

goto check_reboot

:del_elo
rmdir /S /Q %1

:check_reboot
if %2=="reboot" goto reboot_now

goto end_now

:reboot_now
shutdown -r -t 0 -d up:1:2

:end_now
del "C:\EloDelMe.bat"